<?php

/** 
 * 用户任务记录日志
 * @author liubo<liubo@ilongyuan.com.cn>
 */

namespace Common\Service;

Class UserMissionLogService extends BaseService
{

    public function set_log($uid, $action, $score, $memo = '', $target_id = 0, $action_id = 0)
    {
        $data = [
            'uid'       => (int)$uid,
            'action'    => $action,
            'score'     => (int)$score,
            'memo'      => $memo,
            'date'      => date('Y-m-d', NOW_TIME),
            'create_time'   => NOW_TIME,
            'target_id' => $target_id,
            'action_id' => $action_id ?: $uid,
        ];
        $this->add($data);
    }

}